package com.webRepo.zhengze;

/**
 * Created by yan_li on 2016/4/19.
 */
public class ReplaceTest {


	//叠词过滤
    public static void testZhangze(){
        String src="wer#####@dafhfdf";
        String result=src.replaceAll("(.)\\1+","$1");
        System.out.println(result);
    }
    
    //电话号码顾虑
    public static void testMobile(){
        String tel="18710902637";
        tel=tel.replaceAll("(\\d{3})\\d{4}(\\d{4})","$1****$2");
        System.out.print(tel);
    }
    
    public static void GullvNum(){
    	String tel="entery999999339kfjfkfg888883329kfjk888";
    	tel=tel.replaceAll("\\d{5,}", "*****");
    	System.out.println(tel);
    }
    public static void main(String[] args) {
        //testZhangze();
        //testMobile();
    	GullvNum();
    }
}
